package com.myleetcode.twosum;

public class Node implements Comparable<Node> {
	
	private int val;
	private int index;

	public int getVal() {
		return val;
	}

	public void setVal(int val) {
		this.val = val;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	@Override
	public int compareTo(Node n) {
		if(n==null) {
			return -1;
		}
		return this.val-n.getVal();
	}

}
